package com.djmw.mouse.repository;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.djmw.mouse.entity.PositionType;

public interface PositionTypeDao extends PagingAndSortingRepository<PositionType, Long>, JpaSpecificationExecutor<PositionType> {

	@Modifying
	@Query("DELETE FROM PositionType positionType WHERE positionType.level1Id=?1")
	void deleteLevelOnePosition(Long id);

	@Modifying
	@Query("DELETE FROM PositionType positionType WHERE positionType.level2Id=?1")
	void deleteLevelTwoPosition(Long id);
}
